﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuanLyKhachSan
{
    public partial class frmQuanLyKhachSan : Form
    {
        public frmQuanLyKhachSan()
        {
            InitializeComponent();
        }

        private void frmQuanLyKhachSan_Load(object sender, EventArgs e)
        {
            frmDangNhap frm = new frmDangNhap();
            frm.ShowDialog();

        }

        private void Thoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void LapDanhMucPhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmLapDanhMucPhong frm = new frmLapDanhMucPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void LapPhieuThuePhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmLapPhieuThuePhong frm = new frmLapPhieuThuePhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void QuanLyLoaiPhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmQuanLyLoaiPhong frm = new frmQuanLyLoaiPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void QuanLyKhachHang_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmQuanLyKhachHang frm = new frmQuanLyKhachHang();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }
        private void QuanLyLoaiKhachHang_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmQuanLyLoaiKhachHang frm = new frmQuanLyLoaiKhachHang();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }
        private void LapHoaDon_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmLapHoaDon frm = new frmLapHoaDon();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void TimKiemTheoPhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmTraCuuPhong frm = new frmTraCuuPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }


        private void DoanhThuTheoLoaiPhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmBaoCaoDoanhThuTheoLoaiPhong frm = new frmBaoCaoDoanhThuTheoLoaiPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void DoanhThuTheoMatDoSuDungPhong_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmBaoCaoMatDoSuDungPhong frm = new frmBaoCaoMatDoSuDungPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void ThayDoiCacQuiDinh_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmThayDoiQuiDinh frm = new frmThayDoiQuiDinh();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void QuanLyTaiKhoan_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmQuanLyTaiKhoan frm = new frmQuanLyTaiKhoan();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void CapNhatThongTinTaiKhoan_Click(object sender, EventArgs e)
        {
            //dong tat ca cac form khac dang mo
            int length = this.MdiChildren.Length;
            for (int i = length - 1; i >= 0; i--)
            {
                this.MdiChildren[i].Close();
            }

            frmCapNhatThongTinTaiKhoan frm = new frmCapNhatThongTinTaiKhoan();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDLapDanhMucPhong_Click(object sender, EventArgs e)
        {
            frmHDLapDanhMucPhong frm = new frmHDLapDanhMucPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDLapPhieuThuePhong_Click(object sender, EventArgs e)
        {
            frmHDLapPhieuThuePhong frm = new frmHDLapPhieuThuePhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDQuanLyLoaiPhong_Click(object sender, EventArgs e)
        {
            frmHDQuanLyLoaiPhong frm = new frmHDQuanLyLoaiPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDQuanLyKhachHang_Click(object sender, EventArgs e)
        {
            frmHDQuanLyKhachHang frm = new frmHDQuanLyKhachHang();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDLapHoaDon_Click(object sender, EventArgs e)
        {
            frmHDLapHoaDon frm = new frmHDLapHoaDon();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDBaoCaoDoanhThuTheoLoaiPhong_Click(object sender, EventArgs e)
        {
            frmHDBaoCaoDoanhThuTheoLoaiPhong frm = new frmHDBaoCaoDoanhThuTheoLoaiPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDBaoCaoDoanhThuTheoMatDoSuDungPhong_Click(object sender, EventArgs e)
        {
            frmHDBaoCaoMatDoSuDungPhong frm = new frmHDBaoCaoMatDoSuDungPhong();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDThayDoiQuiDinh_Click(object sender, EventArgs e)
        {
            frmHDThayDoiQuiDinh frm = new frmHDThayDoiQuiDinh();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDQuanLyTaiKhoan_Click(object sender, EventArgs e)
        {
            frmHDQuanLyTaiKhoan frm = new frmHDQuanLyTaiKhoan();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }

        private void HDCapNhatThongTinTaiKhoan_Click(object sender, EventArgs e)
        {
            frmHDCapNhatThongTinTaiKhoan frm = new frmHDCapNhatThongTinTaiKhoan();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }
        private void HDQuanLyLoaiKhachHang_Click(object sender, EventArgs e)
        {
            frmHDQuanLyLoaiKhachHang frm = new frmHDQuanLyLoaiKhachHang();
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox = false;
            frm.Show();
        }
        private void frmQuanLyKhachSan_FormClosing(object sender, FormClosingEventArgs e)
        {
            //MessageBox.Show("Ban co muon thoat khoi chuong trinh hay khong");
            
        }

        

        

        
        
    }
}